import request from '@/sheep/request';

const SpuApi = {
	//获取特价活动
	getSpuListactivity: (ids) => {
	  return request({
	    url: '/promotion/special-sale-activity/get-now',
	    method: 'GET',
	    params: { ids },
	    custom: {
	      showLoading: false,
	      showError: false,
	    },
	  });
	},
	//获取特价活动详情
	getSpuListactivitydetail: (ids) => {
	  return request({
	    url: '/promotion/special-sale-activity/get-activity-detail',
	    method: 'GET',
	    params: ids,
	    custom: {
	      showLoading: false,
	      showError: false,
	    },
	  });
	},
	
	
	// 获得特价商品 校验
	getSpuspecialchasecheck: (ids) => {
	  return request({
	    url: '/promotion/special-sale-product/purchase-check',
	    method: 'POST',
	    data: ids,
	    custom: {
	      showLoading: false,
	      showError: false,
	    },
	  });
	},
	
	// 获得特价商品 SPU 列表
	getSpuListpurchasecheck: (ids) => {
	  return request({
	    url: '/product/spu/purchase-check',
	    method: 'POST',
	    data: ids,
	    custom: {
	      showLoading: false,
	      showError: false,
	    },
	  });
	},
	
	
  // 获得商品 SPU 列表
  getSpuListByIds: (ids) => {
    return request({
      url: '/product/spu/list-by-ids',
      method: 'GET',
      params: { ids },
      custom: {
        showLoading: false,
        showError: false,
      },
    });
  },
  // 获得商品 SPU 分页
  getSpuPage: (params) => {
    return request({
      url: '/product/spu/page',
      method: 'GET',
      params,
      custom: {
        showLoading: false,
        showError: false,
      },
    });
  },
  // 查询商品
  getSpuDetail: (id) => {
    return request({
      url: '/product/spu/get-detail',
      method: 'GET',
      params: { id },
      custom: {
        showLoading: false,
        showError: false,
      },
    });
  },
};
export default SpuApi;
